<?php
class AdDelAction extends AdminAction
{
	public function __construct()
	{
		parent::__construct();
		$this->responseType = 'json';
	}

	public function execute()
	{
		$adService = new BaseDbService('ad');
		$id = $this->context->get('id');
		if(is_numeric($id) && $id)
		{
			$adService->del($id);
		 	AdminUtil::clearAdCache();
		}
		
		$this->code = 200;
	}
}
